package com.mdd.admin.validate.goods;

import com.mdd.admin.vo.goods.GoodsSkuVo;
import com.mdd.admin.vo.goods.SpecValueVo;
import com.mdd.common.validator.annotation.IDMust;
import com.mdd.common.validator.annotation.IntegerContains;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

@Data
@ApiModel("商品更新参数")
public class GoodsUpdateValidate implements Serializable {

	private static final long serialVersionUID = 1L;

	//@IDMust(message = "id参数必传且需大于0")
	@ApiModelProperty(value = "ID")
	private Integer id;

	@NotEmpty(message = "请输入商品名称")
	@Length(max = 64, message = "商品名称不能大于64个字符")
	@ApiModelProperty(value = "商品名称")
	private String name;

	@NotEmpty(message = "请输入商品货号")
	@Length(max = 32, message = "商品货号不能大于32个字符")
	@ApiModelProperty(value = "商品编码")
	private String code;

	@ApiModelProperty(value = "商品描述")
	private String description;

	@NotEmpty(message = "请上传商品轮播图")
	@ApiModelProperty(value = "商品轮播图")
	private List<String> goodsImage;

	@NotEmpty(message = "请选择商品分类")
	@ApiModelProperty(value = "商品分类")
	private List<Integer> categoryId;

	@IntegerContains(values = {0, 1})
	@ApiModelProperty(value = "视频开关: [0=关闭, 1=开始]")
	private Integer videoStatus;

	@IntegerContains(values = {1, 2})
	@ApiModelProperty(value = "视频来源: [1=视频素材库, 2=视频链接]")
	private Integer videoSource;

	@ApiModelProperty(value = "视频封面")
	private String videoCover;

	@ApiModelProperty(value = "商品视频")
	private String video;

	@NotNull(message = "请选择运费设置")
	@IntegerContains(values = {1,2}, message = "商品规格值错误")
	@ApiModelProperty(value = "运费类型: 1=包邮, 2=运费模板")
	private Integer expressType;

	@ApiModelProperty(value = "运费模板")
	private Integer expressTemplateId;

	@ApiModelProperty(value = "库存预警")
	private Integer stockWarning = 0;

	@ApiModelProperty(value = "虚拟销量")
	private Integer virtualSalesNum = 0;

	@ApiModelProperty(value = "虚拟点击")
	private Integer virtualClickNum = 0;

	@ApiModelProperty(value = "排序编号")
	private Integer sort = 0;

	@NotNull(message = "请选择商品规格")
	@IntegerContains(values = {1,2}, message = "商品规格值错误")
	@ApiModelProperty(value = "商品规格")
	private Integer specType;

	@NotNull(message = "请选择销售状态")
	@IntegerContains(values = {0,1}, message = "销售状态值错误")
	@ApiModelProperty(value = "销售状态")
	private Integer status;

	@ApiModelProperty(value = "商品内容")
	private String content;

	@ApiModelProperty(value = "规格值")
	private List<SpecValueVo> specValue;

	@ApiModelProperty(value = "规格值列表")
	private List<GoodsSkuVo> specValueList;

	@ApiModelProperty(value = "服务规格值列表")
	private List<GoodsSkuVo> serviceSpecValueList;

	@ApiModelProperty("是否推荐 1=是 0=否")
	private Integer isTop;

	// 供货价
	private BigDecimal supplyPrice;

	// 普通用户返现金额
	private BigDecimal cashbackOrdinary;

	// 银牌用户返现金额
	private BigDecimal cashbackSilver;

	// 金牌用户返现金额
	private BigDecimal cashbackGold;

	// 钻石用户返现金额
	private BigDecimal cashbackDiamond;

	// 合伙人返现金额
	private BigDecimal cashbackPartner;

	// 联创V8返现金额
	private BigDecimal cashbackCreate8;

	// 联创V9返现金额
	private BigDecimal cashbackCreate9;

	// 按售价分佣比例
	private BigDecimal commissionRatio;

	//是否参与返现 1=是 0=否
	private Integer isCashback;

	//下单领取会员 0=无 1=银牌 2=金牌 3=钻石
	private Integer receiveVip;

	//分佣类型 1=利润分佣 2=售价分佣 3=不分佣 4=月分佣 5=日分佣
	private Integer commissionType;

	// 一级银牌 返现/金币 数量
	private BigDecimal level1Silver;
	// 二级银牌 返现/金币 数量
	private BigDecimal level2Silver;
	// 一级金牌 返现/金币 数量
	private BigDecimal level1Gold;
	// 二级金牌 返现/金币 数量
	private BigDecimal level2Gold;
	// 一级钻石 返现/金币 数量
	private BigDecimal level1Diamond;
	// 二级钻石 返现/金币 数量
	private BigDecimal level2Diamond;
	// 一级合伙人 返现/金币 数量
	private BigDecimal level1Partner;
	// 二级合伙人 返现/金币 数量
	private BigDecimal level2Partner;
	// 一级联创V8 返现/金币 数量
	private BigDecimal level1Create8;
	// 二级联创V8 返现/金币 数量
	private BigDecimal level2Create8;
	// 一级联创V9 返现/金币 数量
	private BigDecimal level1Create9;
	// 二级联创V9 返现/金币 数量
	private BigDecimal level2Create9;
	// 下单返金币数量
	private BigDecimal goldCoin;
	//返金币比例 (毛利率*当前比例 * 100(1:100))
	private BigDecimal cashbackRatio;
	// 二级钻石 金币数量
	private BigDecimal level2DiamondGold;
	// 二级合伙人 金币数量
	private BigDecimal level2PartnerGold;
	// 二级联创V8 金币数量
	private BigDecimal level2Create8Gold;
	// 二级联创V9 金币数量
	private BigDecimal level2Create9Gold;
	
	private String city;
	
	private String parameter;
}
